// 账户请求管理接口

import req from '@/utils/request'

// 1.登录
export const api_users_checkLogin=data=>{
    return req({
        url:'/users/checkLogin',
        method:'post',
        data
    })
}

// 2.检查账号是否重复/users/repeat

export const api_users_repeat=data=>{
    return req({
        url:'/users/repeat',
        method:'post',
        data
    })
}

// 3.添加账号/users/add
export const api_users_add=data=>{
    return req({
        url:'/users/add',
        method:'post',
        data
    })
}
// 4.获取账号列表/users/list
export const api_users_list=params=>{
    return req({
        url:'/users/list',
        method:'get',
        params
    })
}

// 5.删除账号/users/del
export const api_users_del=params=>{
    return req({
        url:'/users/del',
        method:'get',
        params
    })
}
// 6.批量删除账号/users/batchdel
export const api_users_batchdel=data=>{
    return req({
        url:'/users/batchdel',
        method:'post',
        data
    })
}
// 7.修改账号/users/edit
export const api_users_edit=data=>{
    return req({
        url:'/users/edit',
        method:'post',
        data
    })
}
// 8.检查旧密码是否正确 /users/checkoldpwd
export const api_users_checkoldpwd=params=>{
    return req({
        url:'/users/checkoldpwd',
        method:'get',
        params
    })
}
// 9.修改密码/users/editpwd
export const api_users_editpwd=data=>{
    return req({
        url:'/users/editpwd',
        method:'post',
        data
    })
}
// 10.获取账号（个人中心）信息/users/info
export const api_users_info=()=>{
    return req({
        url:'/users/info',
        method:'get',
        
    })
}
// 修改用户头像/users/avataredit
export const api_users_avataredit=params=>{
    return req({
        url:'/users/avataredit',
        method:'get',
        params
    })
}